<div class="page-header">
  <h1>{{ page.title }} {% if page.tagline %}<small>{{page.tagline}}</small>{% endif %}</h1>
</div>
	
<article>

	<div class="col-sm-10">
	 <span class="post-date">
	   {% assign d = page.date | date: "%d" | plus:'0' %}
	   {{ page.date | date: "%B" }} 
	   {% case d %}
	     {% when 1 or 21 or 31 %}{{ d }}st,
	     {% when 2 or 22 %}{{ d }}nd,
	     {% when 3 or 23 %}{{ d }}rd,
	     {% else %}{{ d }}th,
	   {% endcase %}
	   {{ page.date | date: "%Y" }}
	 </span>
	  <div class="article_body">
	  {{ content }}
	  </div>

		{% unless page.categories == empty %}
		<ul class="tag_box list-unstyled list-inline">
		  <li><i class="fa fa-folder-open"></i></li>
		  {% assign categories_list = page.categories %}
		  {% if categories_list.first[0] == null %}
			{% for category in categories_list %} 
				<li><a href="{{ site.BASE_PATH }}/{{ site.categories_path }}#{{ category }}-ref">
					{{ category | join: "/" }} <span>({{ site.categories[category].size }})</span>
					{% unless forloop.last %},{% endunless %}
				</a></li>
			{% endfor %}
		  {% else %}
			{% for category in categories_list %} 
				<li><a href="{{ site.BASE_PATH }}/{{ site.categories_path }}#{{ category[0] }}-ref">
					{{ category[0] | join: "/" }} <span>/{{ category[1].size }})</span>
				</a></li>
			{% endfor %}
		  {% endif %}
		</ul>
		{% endunless %}  

		{% unless page.tags == empty %}
		<ul class="list-inline">
		  <li><i class="fa fa-tags"></i></li>
		  {% assign tags_list = page.tags %}
		  {% if tags_list.first[0] == null %}
			{% for tag in tags_list %} 
				<li>
					<a href="{{ site.BASE_PATH }}/{{ site.tags_path }}#{{ tag }}-ref">
					{{ tag }} <span>({{ site.tags[tag].size }})</span>
					{% unless forloop.last %},{% endunless %}
					</a>
				</li>
			{% endfor %}
		  {% else %}
			{% for tag in tags_list %} 
				<li>
					<a href="{{ site.BASE_PATH }}/{{ site.tags_path }}#{{ tag[0] }}-ref">
						{{ tag[0] }} <span>({{ tag[1].size }})</span>
						{% unless forloop.last %},{% endunless %}
					</a>
				</li>
		   	
			{% endfor %}
		  {% endif %}
		  {% assign tags_list = nil %}
		</ul>
		{% endunless %}  

		<hr>

		<div>
      <section class="share col-sm-6">
        <h4 class="section-title">Share Post</h4>
        <a class="btn btn-default btn-sm twitter" href="http://twitter.com/share?text={{page.title | encode}}{% if site.author.twitter%}&via={{site.author.twitter}}{% endif %}"
           onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
          <i class="fa fa-twitter fa-lg"></i>
          Twitter
        </a>
        <a class="btn btn-default btn-sm facebook" href="https://www.facebook.com/sharer/sharer.php"
           onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
          <i class="fa fa-facebook fa-lg"></i>
          Facebook
        </a>
        <a class="btn btn-default btn-sm gplus"
           onclick="window.open('https://plus.google.com/share?url='+window.location.href, 'google-plus-share', 'width=490,height=530');return false;">
          <i class="fa fa-google-plus fa-lg"></i>
          Google+
        </a>
      </section>

      <section class="col-sm-6 author">
        <img src="http://www.gravatar.com/avatar/{{site.author.email_md5}}" class="img-rounded author-image" />
        <h4 class="section-title author-name">{{site.author.name}}</h4>
        <p class="author-bio">{{site.author.bio}}</p>
      </section>
    </div>

    <div class="clearfix"></div>

		<ul class="pager">
		  {% if page.previous %}
		  <li class="previous"><a href="{{ site.BASE_PATH }}{{ page.previous.url }}" title="{{ page.previous.title }}">&larr; Previous</a></li>
		  {% else %}
		  <li class="previous disabled"><a>&larr; Previous</a></li>
		  {% endif %}
		  {% if page.next %}
		  <li class="next"><a href="{{ site.BASE_PATH }}{{ page.next.url }}" title="{{ page.next.title }}">Next &rarr;</a></li>
		  {% else %}
			<li class="next disabled"><a>Next &rarr;</a>
		  {% endif %}
		</ul>

		<hr>
	</div>
	
	<div class="col-sm-2 sidebar-2">
	
	</div>
</article>
<div class="clearfix"></div>
